package com.nancy.java_design.observer.demo2;

import java.util.Observable;
import java.util.Observer;

public class Police implements Observer {
    private String name;

    public Police(String name) {
        this.name = name;
    }

    @Override
    public void update(Observable o, Object arg) {
        System.out.println(name + ", 抓到小偷了" + arg);
    }
}
